package com.ruoyi.hippocampus.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.hippocampus.mapper.EmployeeRoleMapper;
import com.ruoyi.hippocampus.domain.EmployeeRole;
import com.ruoyi.hippocampus.service.IEmployeeRoleService;

/**
 * 员工职务Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-07-05
 */
@Service
public class EmployeeRoleServiceImpl implements IEmployeeRoleService 
{
    @Autowired
    private EmployeeRoleMapper employeeRoleMapper;

    /**
     * 查询员工职务
     * 
     * @param employeeId 员工职务主键
     * @return 员工职务
     */
    @Override
    public EmployeeRole selectEmployeeRoleByEmployeeId(Long employeeId)
    {
        return employeeRoleMapper.selectEmployeeRoleByEmployeeId(employeeId);
    }

    /**
     * 查询员工职务列表
     * 
     * @param employeeRole 员工职务
     * @return 员工职务
     */
    @Override
    public List<EmployeeRole> selectEmployeeRoleList(EmployeeRole employeeRole)
    {
        return employeeRoleMapper.selectEmployeeRoleList(employeeRole);
    }

    /**
     * 新增员工职务
     * 
     * @param employeeRole 员工职务
     * @return 结果
     */
    @Override
    public int insertEmployeeRole(EmployeeRole employeeRole)
    {
        return employeeRoleMapper.insertEmployeeRole(employeeRole);
    }

    /**
     * 修改员工职务
     * 
     * @param employeeRole 员工职务
     * @return 结果
     */
    @Override
    public int updateEmployeeRole(EmployeeRole employeeRole)
    {
        return employeeRoleMapper.updateEmployeeRole(employeeRole);
    }

    /**
     * 批量删除员工职务
     * 
     * @param employeeIds 需要删除的员工职务主键
     * @return 结果
     */
    @Override
    public int deleteEmployeeRoleByEmployeeIds(Long[] employeeIds)
    {
        return employeeRoleMapper.deleteEmployeeRoleByEmployeeIds(employeeIds);
    }

    /**
     * 删除员工职务信息
     * 
     * @param employeeId 员工职务主键
     * @return 结果
     */
    @Override
    public int deleteEmployeeRoleByEmployeeId(Long employeeId)
    {
        return employeeRoleMapper.deleteEmployeeRoleByEmployeeId(employeeId);
    }
}
